<div class="content">
	<style>
	.n-box a{font-size:12px;}
	.n-box a span{color:#56945D}
	.plugins-item{text-align:center;border:1px solid;padding:4px;display: inline-block;font-size:12px;}
	.plugins-item{border-color:#789abc;background-color: #eee;}
	.plugins-item span{display:inline-block;overflow:hidden; text-overflow:ellipsis;white-space:nowrap;width:70px;}
	.plugins-item span{}
	</style>
	<?php
	$tools = array();
	//$tools[] = n_href(n_url("nsite","edit"),"创建站点");
	echo n_mod('skin')->pageHead("网站列表",$tools)
	?>
	
	<?php
	if(!empty($data['site'])){
		$nsite = n_api("nsite");
		$pbox = n_api("pbox");
		$rbac = n_api("rbac");
		$member = n_api("member");
		$passport = n_api("passport");

		$spackage = n_api('spackage');
		foreach($data['site'] as $key=>$val){
			
			$spaInfo = $spackage->getSiteServicesMenu($val['scode']);
	?>
	
	<dl class="n-box n-sep">
		<dt class="n-box-head">
			<span class="n-right">
				<a class="n-href" href="<?=$val['url']?>" target="_blank"><span>访问</span></a>
			</span>
			<?=$val['name']?>
		</dt>
		<dd class="n-box-body n-clearfix">
			<div class="n-size-normal n-box-float">
			<?php
			if(!empty($spaInfo)){
			?>
			<ul class="n-clearfix" style="padding:10px;">
				<?php
				foreach($spaInfo as $key1=>$val1){
					
					if('Y'==$val1['used']){
						continue;
					}
					$pinfo = $pbox->getByPevent($val1['pevent']);
					//$pinfo = $pbox->get($val1['main_id']);
				?>
				<a class="n-sep-right n-sep-bottom plugins-item" href="<?=n_url($pinfo['pevent'],'siteIndex',array('scode'=>$val['scode']))?>" title="<?=$pinfo['pname']?>">
					<img width="70" height="70" src="<?=n_url('nfile','getImg',array('id'=>$pinfo['icon_nfileid'],'default'=>n_img('pbox','13.png')))?>" /><br />
					
					<span><?=$pinfo['pname']?></span>
				</a>
				<?php
				}
				?>
			</ul>
			<?php
			}
			?>
			</div>
	
	
	
			<div class="" style="margin-left:500px;">
				
				<div class="n-sep n-txt">
					人员角色列表:
					<?=n_ui(n_url("nsite","playerEdit",array('id'=>$val['id'])),"人员")?>
					<br />
					<?php
					$player = $nsite->getPlayer($val['id']);
					foreach($player as $key1=>$val1){
						$uinfo = $passport->get($val1['ppid']);
					?>
					<?=$uinfo['uname']?>,
					<?php
					}
					?>
					<!--
					<?php
					$siteRole = $rbac->getSiteRole($val['scode']);

					if(!empty($siteRole)){
					foreach($siteRole as $key1=>$val1){
						if('Y'==$val1['isdel']){
							continue;
						}
						$ppids = $rbac->getSiteRolePpid($val['scode'],$val1['id']);
					?>
					<div style="float:left;">
					<?=$val1['name']?>
					:
					</div>
					<div style="margin-left:45px;"><?php
						if(!empty($ppids)){
						foreach($ppids as $key2=>$val2){
							$tname = $member->getAval($val2,'tname');
							
							if('null'==$tname){
								$ppinfo = $passport->get($val2);
								$tname = $ppinfo['uname'];
							}
						?>
						<?=$tname?>,
						<?php
						}
						}else{
						?>
						暂无人员配置
						<?php
						}
						?>
					[<?=n_ui(n_url('rbac','siteRoleDeputeEdit',array('rmid'=>$val1['rmid'])),'人员配置')?>]
					</div>
					<?php
					}
					}else{
					?>
					暂无角色配置
					<?php
					}
					?>
					-->
				</div>
				<div class="n-txt n-sep">
					<?=$val['descript']?>
				</div>
	
			</div>
	
		</dd>
	</dl>
	<?php
		}
	}else{
	?>
	<div class="n-sep n-alert">暂无注册服务</div>
	<?php
	}
	?>
		
</div>